<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>${I18n.getMessage("PrivateMessage.findUser")}</title>
<meta http-equiv="Content-Type" content="text/html; charset=${encoding}" />
<style type="text/css">@import url( ${contextPath}/templates/${templateName}/styles/style.css );</style>
</head>

<body class="section-ucp ltr ${language}">

<script type="text/javascript">
<!--
function refreshUsername()
{
	var u = document.search.selectedUsername;

	opener.document.forms['postform'].toUserId.value = u.value
	opener.document.forms['postform'].toUsername.value = u[u.selectedIndex].text;

	opener.focus();
	window.close();
}
-->
</script>
<form action="${contextPath}/jforum${extension}" method="post" name="search" id="search" accept-charset="${encoding}">
<input type="hidden" name="action" value="${action}" />
<input type="hidden" name="module" value="${moduleName}" />
<div id="simple-wrap">
<div id="page-body">
<h2 class="solo">${I18n.getMessage("PrivateMessage.findMember")}</h2>

<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>

	<p>${I18n.getMessage("PrivateMessage.searchTip")}</p>

	<fieldset class="fields1 column1">
	<dl>
		<dt><label for="username">${I18n.getMessage("User.username")}:</label></dt>
		<dd><input type="text" name="username" id="username" value="${username?default("")?html}" class="inputbox" style="width:100px"></dd>
	</dl>
	
	<dl>
	   <#if (showResult && namesList.size()>0)>
			<select name="selectedUsername">
				<#list namesList as user>
					<option value="${user.id}">${user.username}</option>
				</#list>
			</select>
		</#if>
	   
	</dl>


	</fieldset>


	<div class="clear"></div>

	<hr>

	<fieldset class="submit-buttons">
		<input type="button" value="${I18n.getMessage("closeWindow")}" name="close" class="button2" onclick="javascript:window.close();"/>&nbsp;
		<input type="submit" name="submit" value="${I18n.getMessage("ForumBase.search")}" class="button1"/>
		<#if (showResult && namesList.size()>0)>
		   <input type="button" value="${I18n.getMessage("select")}" class="button1" onclick="refreshUsername();" />
		</#if>
		
	</fieldset>

	<span class="corners-bottom"><span></span></span></div>
</div>
</div>

<div id="page-footer">
	<div class="copyright">${I18n.getMessage("poweredBy")} <a href="http://www.jforum.net/">JForum ${version}</a>&nbsp;&nbsp;&#169;<a class="copyright" href="http://www.jforum.net/team.jsp" target="_blank">JForum Team</a></div>
</div>

</div>
</form>
</body>
</html>